% 1.1d
clear;

mu = 18000; % 18000;
phase = rand*2*pi;
f1 = 4000;
fs = 8000;

n = 0:1/8000:50e-3;
y2 = cos(pi*mu*n.^2+2*pi*f1*n+phase);

subplot(2,1,1);
stem(n,y2);
xlabel('Sample number n');
ylabel('Value y(n)');

subplot(2,1,2);
plot(n,y2);
xlabel('Sample number n');
ylabel('Value y(n)');

 subplot(3,1,3);
 x = 0:1/8000:2;
 y = cos(pi*mu*x.^2 + 2*pi*f1*x + phase);
 plot(x,y);

%wavplay(y,fs);